package com.yang.designmode.decorator;

public class Test {
    public static void main(String[] args) {
        Coffee coffee = new SimpleCoffee();
        System.out.println("Cost: $" + coffee.cost() + " | Description: " + coffee.description());

        Coffee milkCoffee = new MilkDecorator(new SimpleCoffee());
        System.out.println("Cost: $" + milkCoffee.cost() + " | Description: " + milkCoffee.description());

        Coffee sugarMilkCoffee = new SugarDecorator(new MilkDecorator(new SimpleCoffee()));
        System.out.println("Cost: $" + sugarMilkCoffee.cost() + " | Description: " + sugarMilkCoffee.description());
    }
}
